<!DOCTYPE html>
<html>

<head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>我的客户</title>
        <link rel="stylesheet" href="css/amazeui.min.css" />
        <link rel="stylesheet" href="css/app.css" />
        <link rel="stylesheet" href="css/swiper-3.3.1.min.css" />
        <script src="js/jquery.min.js" type="text/javascript"></script>
        <script src="js/amazeui.min.js" type="text/javascript"></script>

        <style>
                body {
                        max-width: 640px;
                        margin: 0 auto;
                        font-size: 10px;
                        background: #F2F1F6;
                }

                * {
                        box-sizing: border-box;
                }

                [class*=am-u-] {
                        padding: 0;
                }
        </style>
</head>

<body>
        <!--头部-->
        <header class="am-u">
                <div class="am-u-sm-12 head_nav" style="margin:0;">
                        <div class="am-u-sm-2 am-vertical-align" style="text-align: center;">
                                <a href="home.html">
                                        <img src="img/return@2x.png" class="am-vertical-align-middle" alt="" />
                                </a>
                        </div>
                        <div class="am-u-sm-8 head_text">
                                我的客户
                        </div>
                        <div class="am-u-sm-2" style="color: #fff;font-size: 13px;text-align: center;">

                        </div>
                </div>
        </header>
        <div style="clear: both;"></div>
        <div style="background:#fff;">
                <div style="text-align: center;position: relative;">
                        <img src="img/service_bg_profits@2x.png" width="40%" alt="" style="margin-top: 10%;" />
                        <div style="position: absolute;z-index: 100;top: 33%;width: 100%;text-align: center;">
                                <span style="font-size: 30px;color: #ff6600;" id="all_num"></span>
                        </div>
                        <div style="position: absolute;z-index: 100;top: 62%;text-align: center;text-align: center;width: 100%;">
                                <span style="font-size: 14px;color: #333;">累计客户数</span>
                        </div>
                        <div style="position: absolute;z-index: 100;top: 93%;text-align: center;text-align: center;width: 100%;">
                                <span style="font-size: 14px;color: #333;">单位：个</span>
                        </div>
                </div>
                <div style="text-align:center;">
                        <div style="width:40%;text-align: center;position: relative;display:inline-block">
                                <img src="img/service_bg_profits@2x.png" width="100%" alt="" style="margin-top: 10%;" />
                                <div style="position: absolute;z-index: 100;top: 33%;width: 100%;text-align: center;">
                                        <span style="font-size: 30px;color: #ff6600;" id="dir_num">0</span>
                                </div>
                                <div style="position: absolute;z-index: 100;top: 62%;text-align: center;text-align: center;width: 100%;">
                                        <span style="font-size: 14px;color: #333;">直推人数</span>
                                </div>
                                <div style="position: absolute;z-index: 100;top: 93%;text-align: center;text-align: center;width: 100%;">
                                        <span style="font-size: 14px;color: #333;">单位：个</span>
                                </div>
                        </div>
                        <div style="width:40%;text-align: center;position: relative;display:inline-block;">
                                <img src="img/service_bg_profits@2x.png" width="100%" alt="" style="margin-top: 10%;" />
                                <div style="position: absolute;z-index: 100;top: 33%;width: 100%;text-align: center;">
                                        <span style="font-size: 30px;color: #ff6600;" id="indir_num">0</span>
                                </div>
                                <div style="position: absolute;z-index: 100;top: 62%;text-align: center;text-align: center;width: 100%;">
                                        <span style="font-size: 14px;color: #333;">间推人数</span>
                                </div>
                                <div style="position: absolute;z-index: 100;top: 93%;text-align: center;text-align: center;width: 100%;">
                                        <span style="font-size: 14px;color: #333;">单位：个</span>
                                </div>
                        </div>
                </div>
        </div>
        <div style="width: 100%;text-align: center;font-size: 17px;padding-top: 5%;background: #fff;">
                今日累计新增
                <span style="color: #6A9DDC;" id="today_all"></span>个客户
        </div>
        <div style="font-size: 15px ;padding: 3px 10px 3px 10px;border-bottom: 1px solid #D8D8D8;">
                客户明细
        </div>
        <div style="clear: both;"></div>
        <div class="am-u" id="kh_list">
                <!--			<a href="">
				<div class="am-u-sm-12 yyt" style="	padding: 5px 10px 5px 10px;border-bottom: 1px solid #D8D8D8;">
					<div class="am-u-sm-1">
						<span>普通会员</span>
					</div>
					<div class="am-u-sm-2" style="text-align: center;padding-top: 6PX;">
						<img src="img/cs.png"  alt="" />
					</div>
					<div class="am-u-sm-1" style="text-align: center;padding-top: 5px;">
						<span style="font-size: 15px;">0</span>
					</div>
					<div class="am-u-sm-offset-4 am-u-sm-1" style="text-align: right;">
						<span style="color: #BEBEBE;">今日新增</span>
					</div>
					<div class="am-u-sm-2" style="text-align: center;">
						<div style="margin-top: 6px;margin-left: 26px">
							<span  style="    background: red; border-radius: 50%;font-size: 15px; color: #fff; width: 25px;display: block;">0</span>
						</div>
					</div>
					<div class="am-u-sm-1" style="text-align: right;padding-top: 7px;">
						<img src="img/right1.png" style="width: 20px;" alt="" />
					</div>
				</div>
			</a>-->
        </div>
        <!--<script src="js/jquery-1.11.3.js"></script>-->
        <script src="js/loading.js"></script>
        <script>
                var token1 = sessionStorage['token'];
                var method1 = "get_down_all";
                $.ajax({
                        type: 'POST',
                        url: "http://www.rice.com/app/api/h5_access",
                        contentType: "application/x-www-form-urlencoded; charset=utf-8",
                        datatype: "JSON",
                        data: {
                                method: method1,
                                token: token1
                        },
                        success: function (data) {
                                var data1 = JSON.parse(data);
                                //                            console.log(data1.data.data);
                                if (data1.status === 1) {
                                        var html = "";
                                        for (var i in data1.data.data) {
                                                html += `<a href="list4.html?id=` + data1.data.data[
                                                                i].level +
                                                        `"><div class="am-u-sm-12 yyt" style="	padding: 5px 10px 5px 10px;border-bottom: 1px solid #D8D8D8;display:flex;align-items:center;">`;
                                                html += `<div class="am-u-sm-1"><span >` +
                                                        data1.data.data[i].name +
                                                        `</span></div>`;
                                                html +=
                                                        `<div class="am-u-sm-2" style="text-align: center;"><img src="` +
                                                        data1.data.data[i].img +
                                                        `"  alt="" /></div>`;
                                                html +=
                                                        `<div class="am-u-sm-1" style="text-align: center;"><span style="font-size: 15px;">` +
                                                        data1.data.data[i].num +
                                                        `</span></div>`;
                                                html +=
                                                        `<div class="am-u-sm-offset-4 am-u-sm-1" style="text-align: right;"><span style="color: #BEBEBE;">今日新增</span></div>`;
                                                html +=
                                                        `<div class="am-u-sm-2" style="text-align: center;">
                                                    <div style="margin-left: 26px">
                                                            <span  style="    background: red; border-radius: 50%;font-size: 15px; color: #fff; width: 25px;display: block;">` +
                                                        data1.data.data[i].today_num +
                                                        `</span>
                                                    </div>
                                            </div>`;
                                                html +=
                                                        `<div class="am-u-sm-1" style="text-align: right;">
                                                    <img src="img/right1.png" style="width: 20px;" alt="" />
                                            </div></div></a>`;
                                        }
                                        $("#kh_list").html(html);
                                        $("#all_num").html(data1.data.all_num);
                                        $("#dir_num").html(data1.data.dir_num);
                                        $("#indir_num").html(data1.data.indir_num);
                                        $("#today_all").html(data1.data.today_all);
                                } else if (Number(data1.status) == 2) {
                                        alert(data1.message);
                                        window.location.href = "login.html";
                                } else {
                                        alert(data1.message);
                                }
                        }
                });
        </script>
</body>

</html>